package indi.caibo.service_edu.controller.front.clinet;

import indi.caibo.commonutils.R;
import indi.caibo.service_edu.controller.front.clinet.impl.VodFileDegradeFeignClient;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author Bo Cai
 * @version 1.0
 * @date 2021/10/10 16:02
 */
@FeignClient(name = "service-vod", fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {
    @DeleteMapping("/vod/video/{videoId}")
    public R removeVideo(@ApiParam(name = "videoId", value = "云端视频id", required = true)
                         @PathVariable("videoId") String videoId);

    /**
     * 批量删除视频
     *
     * @param videoIdList
     * @return
     */
    @DeleteMapping("/vod/video/deleteBatch")
    public R removeVideoList(
            @ApiParam(name = "videoIdList", value = "云端视频id", required = true)
            @RequestParam("videoIdList") List<String> videoIdList);
}
